#include <stdio.h>

void bubble_sort(int arr[], int length)
{
    int i = 0;
    for (i = 0; i < length; i++)
    {
        int j = 0;
        for (j = 0; j < length - i; j++)
        {
            int temp;
            if (arr[j] > arr[j + 1])
            {
                temp = arr[j];
                arr[j] = arr[j + 1];
                arr[j + 1] = temp;
            };
        }
    }

    int m = 0;
    for (m = 0; m < length; m++)
    {
        printf("%d \n", arr[m]);
    }
}

int main()
{

    int arr[] = {1, 5, 6, 9, 10, 3};

    int length = sizeof(arr) / sizeof(arr[0]);
    bubble_sort(arr, length);
}
